package com.study.springboot.common.mvc.validate;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;


/**
 * @author wei.zhao
 * @description: 手机号校验
 * @date 2021年12月27日 17:33
 */
@Target({ElementType.FIELD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Inherited
@Constraint(validatedBy = {PhoneValidator.class})
public @interface PhoneValidate {

    String message() default "手机号格式异常";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
